package com.taotao.controller;

import com.taotao.pojo.TbItem;
import com.taotao.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by Chen-D.W on 2017/7/19.
 */
@Controller
@RequestMapping(value = {"/item"})
public class ItemsController {
    @Autowired
    private ItemService itemService;
    /**
    *@Author Chen-DongWei  com.hmw.open
    *Date 2017/7/19 20:34
    *@Descrintion 根据id查询商品
    */
    @RequestMapping(value = {"/te/{id}"})
    @ResponseBody
    public TbItem tbItem(@PathVariable("id") Long id){
        return itemService.selectById(id);
    }
    /**
    *@Author Chen-DongWei  com.hmw.open
    *Date 2017/7/19 20:35
    *@Descrintion 商品列表
    */
    @RequestMapping(value = {"/list"},method = RequestMethod.GET)
    public ModelAndView itemList(){
        return
    }
}
